Skip to content

use writeFileSync instead of echo to clear the logfile [LOC-6480]#169

Open
rounak610 wants to merge 1 commit intomasterfrom
LOC-6480
Open

use writeFileSync instead of echo to clear the logfile [LOC-6480]#169
rounak610 wants to merge 1 commit intomasterfrom
LOC-6480

Conversation

@rounak610
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the log file clearing mechanism by replacing shell command execution with native Node.js file system operations.

Changes:

  • Replaced childProcess.exec('echo "" > ' + logfile) with fs.writeFileSync(logfile, '') in both the start() and startSync() methods
  • Added try-catch error handling for file operations with informative error messages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants